<?php
if($chave == "rtg4df65g4t"){
    $cont = 0;
    while ($arquivo[$cont]){
        $new_dir = str_replace('/', '_', $arquivo[$cont]);
        shell_exec("mkdir tmp/$temp_dir/$new_dir");
        shell_exec("cp ../../$arquivo[$cont]/* tmp/$temp_dir/$new_dir/");
        
        $cont++;
    }
}